package com.zyg.service.impl;

import com.zyg.dao.GradeMapper;
import com.zyg.pojo.Grade;
import com.zyg.service.GradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("gradeService")
public class GradeServiceImpl implements GradeService {

    @Autowired
    private GradeMapper gradeMapper;

    @Override
    public List<Grade> findAll(Grade grade, int offset, int pageSize) {
        return gradeMapper.findAll(grade, offset, pageSize);
    }

    @Override
    public List<Grade> getGradeList() {
        return gradeMapper.getGradeList();
    }

    @Override
    public int addGrade(Grade grade) {
        return gradeMapper.addGrade(grade);
    }

    @Override
    public int deleteGrade(int id) {
        return gradeMapper.deleteGrade(id);
    }

    @Override
    public Grade findGradeById(int id) {
        return gradeMapper.findGradeById(id);
    }

    @Override
    public int updateGrade(Grade grade) {
        return gradeMapper.updateGrade(grade);
    }

    @Override
    public int count(Grade grade) {
        return gradeMapper.count(grade);
    }

}